<?php /* Smarty version Smarty-3.1.18, created on 2017-05-24 14:41:30
         compiled from "/data/www/mystery/protected/modules/webadmin/views/netquestion/list.tpl" */ ?>
<?php /*%%SmartyHeaderCode:140909853754cf5e582e2552-32756778%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'b57b1fe4be51cc330b7f521aa2a77331be60f537' => 
    array (
      0 => '/data/www/mystery/protected/modules/webadmin/views/netquestion/list.tpl',
      1 => 1494904921,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '140909853754cf5e582e2552-32756778',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_54cf5e58356770_35192433',
  'variables' => 
  array (
    'question_info' => 0,
    'project_id' => 0,
    'list' => 0,
    'val' => 0,
    'auditStatus' => 0,
    'netQuestionStatus' => 0,
    'page' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_54cf5e58356770_35192433')) {function content_54cf5e58356770_35192433($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include '/data/www/mystery/protected/extensions/Smarty/plugins/modifier.date_format.php';
?><?php echo $_smarty_tpl->getSubTemplate ("../common/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<table width="100%" border="0" cellspacing="0">
    <tr>
    <td width="13%" valign="top">
        <?php echo $_smarty_tpl->getSubTemplate ("../common/left.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

    </td>
    <td width="87%" valign="top">
        <table width="100%" border="0" cellspacing="0">
            <tr>
                <td>
                <div class="subnav">
                        <div class="content-menu ib-a blue line-x">
                            <a href="javascript:void(0);" class="on"><em><b><?php echo $_smarty_tpl->tpl_vars['question_info']->value['question_name'];?>
</b>--网点管理</em></a>
                            <!--<span>|</span><a href="/webadmin/question/add?project_id=<?php echo $_smarty_tpl->tpl_vars['project_id']->value;?>
"><em>添加<b><?php echo $_smarty_tpl->tpl_vars['question_info']->value['question_name'];?>
</b>网点</em></a><span>|</span>-->
                        </div>
                </div>

                <div class="pad_10">
                <div class="table-list">
                    <form name="form1" id="myform" method="post" action="/webadmin/netquestion/SetStatus" >
                    <table width="100%">
                        <thead>
                            <tr>
                            <th width="5%">全选</th>
                            <th width="5%">网点编号</th>
                            <th width="20%">网点名称</th>
                            <th width="10%">节点状态</th>
                            <th width="15%">更新时间</th>
                            <th width="10%">状态</th>
                            <th width="15%">创建时间</th>
                            <th width="20%">管理操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php  $_smarty_tpl->tpl_vars['val'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['val']->_loop = false;
 $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['list']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['val']->key => $_smarty_tpl->tpl_vars['val']->value) {
$_smarty_tpl->tpl_vars['val']->_loop = true;
 $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['val']->key;
?>
                                <tr onMouseOver="this.className = 'tr2'" onMouseOut="this.className = 'tr1'" class="tr1" id="nq_<?php echo $_smarty_tpl->tpl_vars['val']->value['nq_id'];?>
">
                                <td><input type="checkbox" name="nq_id[]" value="<?php echo $_smarty_tpl->tpl_vars['val']->value['nq_id'];?>
" /></td>
                                <td><?php echo $_smarty_tpl->tpl_vars['val']->value['network_num'];?>
</td>
                                <td align="center"><?php echo $_smarty_tpl->tpl_vars['val']->value['network_name'];?>
</td>
                                <td align="center"><a href="javascript:void(0);"><span style=""><?php if ($_smarty_tpl->tpl_vars['auditStatus']->value[$_smarty_tpl->tpl_vars['val']->value['audit']]) {?><?php echo $_smarty_tpl->tpl_vars['auditStatus']->value[$_smarty_tpl->tpl_vars['val']->value['audit']];?>
<?php } else { ?>--<?php }?></span></a> </td>
                                <td align="center"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['val']->value['update_time'],"%Y-%m-%d %H:%M:%S");?>
</td>
                                <td align="center"><?php echo $_smarty_tpl->tpl_vars['netQuestionStatus']->value[$_smarty_tpl->tpl_vars['val']->value['status']];?>
</td>
                                <td align="center"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['val']->value['create_time'],"%Y-%m-%d %H:%M:%S");?>
</td>
                                <td align="center">
                                    <?php if ($_smarty_tpl->tpl_vars['val']->value['status']==1) {?>
                                    <a href="/webadmin/netQuestion/edit?nq_id=<?php echo $_smarty_tpl->tpl_vars['val']->value['nq_id'];?>
" target="_blank">修改</a> | 
                                    <?php if ($_smarty_tpl->tpl_vars['question_info']->value['status']==2||$_smarty_tpl->tpl_vars['question_info']->value['status']==100) {?><a href="/webadmin/netQuestion/preview?nq_id=<?php echo $_smarty_tpl->tpl_vars['val']->value['nq_id'];?>
" target="_blank">预览</a> | <?php }?>
                                    <a href="javascript:void(0);" onclick="del(<?php echo $_smarty_tpl->tpl_vars['val']->value['nq_id'];?>
);">删除</a><?php if ($_smarty_tpl->tpl_vars['val']->value['haveattach']) {?> | 
                                    <a href="/webadmin/attach/DownNq?nq_id=<?php echo $_smarty_tpl->tpl_vars['val']->value['nq_id'];?>
" target="_blank">下载附件</a><?php }?>
                                    <?php }?>
                                </td>
                                </tr>
                            <?php } ?>
                            <tr>
                                <td colspan="3"><input type="checkbox" id="che_box" value="" />全选&nbsp;&nbsp;&nbsp;<input type="submit" value="设为完成状态" /></td>
                                <td colspan="5" style="text-align:right;"><?php echo $_smarty_tpl->tpl_vars['page']->value;?>
</td>
                            </tr>
                        </tbody>
                    </table>
                    </form>
                </div>
        </div>
        </td>
    </tr>
    </table>
</td>
</tr>
</table>
<script type="text/javascript">
 //删除网点问卷
 function del(nq_id){
     if (confirm('你确定要删除吗？')) {
            $.ajax({
                    type: 'post',
                    async: true,
                    dataType: "json",
                    data: {'nq_id':nq_id},
                    url: '/webadmin/netQuestion/del',
                    success: function (data) {
                        alert(data.note);
                        if (data.status==1) {
                            $('#nq_' + id).remove();
                        }
                    }
            });
    }
 }
 function showRequest(formData, jqForm, options) { 
    return true;
}
function showResponse(responseText, statusText, xhr, $form)  { 
    alert(responseText.note);
    window.location.reload();
}
 $(function(){
    //复选框事件  
    //全选、取消全选的事件  
    $(document).on("click","#che_box",function(){
        var ischecked= $("#che_box:checked").length;

        var $checkboxs =$("input[name='nq_id[]']");
        if(ischecked){
            $checkboxs.prop("checked",true);
        }else{
            $checkboxs.prop("checked",false);
        }
    }); 
    var options = {         
        beforeSubmit:  showRequest,  
        success:       showResponse,
        dataType:  'json'
    }
    $('#myform').ajaxForm(options); 
})
</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
